package com.atguigu.e_substring;

public class Demo {
    public static void main(String[] args) {
        String str = "HelloWorld";

        //要World
        String substring1 = str.substring(5);
        System.out.println("substring1 = " + substring1);

        //要oWo
        String substring2 = str.substring(4, 7);
        System.out.println("substring2 = " + substring2);
    }
}
